{% extends "layout.html" %}
{% block content %}
<h2>上传视频进行检测</h2>
<form method="post" enctype="multipart/form-data" class="mb-3">
  <input class="form-control" type="file" name="file" accept="video/*" required>
  <button class="btn btn-primary mt-2" type="submit">上传并检测</button>
</form>

{% if video_url %}
<div class="video-player">
  <video id="processedVideo" controls preload="metadata">
    <source src="{{ video_url }}" type="video/mp4">
    您的浏览器不支持 video 标签。
  </video>
</div>
<script src="{{ url_for('static', filename='js/video.js') }}"></script>
{% endif %}
{% endblock %}